Motion compensation method, picture coding method and picture decoding method

ABSTRACT

A picture coding apparatus includes a motion vector estimation unit and a motion compensation unit. The motion vector estimation unit selects one method for deriving a motion vector of a block to be motion-compensated, depending on a motion vector of a block located in a corner of a decoded macroblock from among a group of blocks that compose the decoded macroblock corresponding to the current macroblock to be coded and determines the motion vector derived by the selected method for derivation to be a candidate of the motion vector of the current macroblock to be coded. The motion compensation unit generates a predictive image of the block to be motion-compensated based on the estimated motion vector.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates to a motion compensation method usingmotion vectors and picture coding, and decoding methods using the motioncompensation method.

2. Background Art

In recent years, accompanied by the development of multimediaapplications, it is becoming universal to deal with media information asa whole such as a picture, a voice and a text. At this time, it ispossible to deal with the media uniformly by digitizing the entiremedia. However, the digitized picture has an extremely large amount ofdata and therefore a technology for compressing picture information isindispensable. On the other hand, it is also important to standardizecompression technology to interoperate compressed picture data. Asstandards of picture compression technology, there are H. 261 and H. 263of ITU-T (International Telecommunication Standardization Section), MPEG(Moving Picture Experts Group)-1, MPEG-2, MPEG-4 and the like of ISO/IEC(International Standardization Organization/InternationalElectrotechnical Commission).

Generally, information volume is compressed by reducing redundancy intemporal and spatial directions of moving picture coding. Therefore, forinterpicture prediction coding aimed at reducing temporal redundancy,motion estimation and generation of a predictive picture are performedon a block-by-block basis by referring to a preceding picture and afollowing picture Coding is performed for a difference value between anobtained predictive image and an image of a current macroblock to becoded. Here, a picture is a term to represent one screen; it means aframe in a progressive picture and a frame or a field in an interlacepicture. Here, an interlace picture is a picture in which one frame isformed with two fields with different time. In a coding and decodingprocess of an interlace picture, it is possible to process one frame asa frame “as is” or two fields. Also it is possible to process one framestructure or one field structure for each block in the frame.

A picture that does not have a reference picture and in whichintrapicture prediction coding is performed is called an “I picture.”Additionally, a picture in which only one picture is referred andinterpicture prediction coding is performed is called a “P picture.”Moreover, a picture in which two pictures are referred at one time andinterpicture coding can be performed is called a “B picture.” In a Bpicture, two pictures can be referred as an arbitrary combination fromforward pictures or backward pictures in display order. It is possibleto select appropriate reference pictures for each block that is a basicunit for coding and decoding. Two reference pictures are distinguished:a reference picture that is described earlier in a coded bit stream isthe first reference picture, and a reference picture that is describedlater in the coded bit stream is the second reference picture. But it isnecessary that the reference pictures are already coded or decoded as acondition in the case of coding and decoding these pictures.

To code a P picture or a B picture, interpicture prediction coding usingmotion compensation is used. The interpicture prediction coding usingmotion compensation is a coding method in which motion compensation isapplied to interpicture prediction. Motion compensation is a method thatdoes not simply perform prediction based on pixel values of a block in areference frame co-located with a current block but estimates a motionamount (hereinafter, called a “motion vector”) of each part and performsprediction considering the motion amount to improve predictive accuracyand reduce data amount. For example, estimating a motion vector of acurrent picture to be coded, obtaining a predictive value that has beenshifted by the amount of the motion vector and coding a predictiveresidual (that is the difference between the predictive value and apixel value of each pixel in the current picture to be coded),successfully reduce the data amount. In the case of this method,information of a motion vector is necessary at the time of decoding andtherefore the motion vector is also coded and recorded, or transmitted.

The motion vector is estimated on a block-by-block basis, the blockshaving a predetermined size. Concretely, the motion vector is estimatedby moving each block in a reference picture corresponding to each blockin a current picture to be coded in a search area and by detecting thelocation of the reference block that is most similar to the currentblock to be coded.

FIG. 1 is a block diagram showing the structure of a conventionalpicture coding apparatus 100. The picture coding apparatus 100 includesa difference unit 101, an image coding unit 102, a variable lengthcoding unit 103, an image decoding unit 104, an addition unit 105, apicture memory 106, a picture memory 107, a motion compensation unit108, a motion vector estimation unit 109 and a motion vector storageunit 110. Here, as for motion compensation, an appropriate block size isselected on a macroblock-by-macroblock basis from seven block sizes andused for coding and decoding, the seven block sizes being 4×4 pixels,4×8 pixels, 8×4 pixels, 8×8 pixels, 8×16 pixels, 16×8 pixels and 16×16pixels according to ITU-T H.26L TML8, which is currently understandardization.

The picture memory 107 stores image data “Img” that represents movingpictures inputted in the display order on a picture-by-picture basis.The difference unit 101 calculates the difference between the image data“Img” read out from the picture memory 107 and predictive image data“Pred” inputted from the motion compensation unit 108 and generatespredictive residual image data “Res”. The image coding unit 102 performscoding processes such as frequency conversion and quantization to theinputted predictive residual image data “Res” and generates codedresidual data “CodedRes”. In the case of intrapicture coding,interpicture motion compensation is not performed and therefore thevalue of the predictive image data “Pred” is thought to be “0.”

The motion vector estimation unit 109 estimates the motion vector thatshows the location predicted to be optimum in the search area in thereference picture that is reference picture data “Ref,” which is codeddecoding picture data stored in the picture memory 106 and outputs amotion parameter “MotionParam” that represents the estimated motionvector. In addition, at that time, the motion vector estimation unit 109switches reference pictures according to whether a current picture to becoded is a P picture or a B picture. Coding mode “Mod” shows in whichway (for example, which one of a bi-predictive mode, a unidirectionalmode and a direct mode) motion compensation is performed. For example,in the direct mode, the motion vector estimation unit 109 calculatesbi-predictive motion vectors of the current block to bemotion-compensated by using a motion vector derived from another block.Here, a picture referred to derive a motion vector in the direct mode iscalled a standard picture and a block in the standard picture co-locatedwith the current block is called a standard block. In this case, valuesof motion vectors in the direct mode are calculated with a 16×16-pixelmacroblock as the unit regardless of the block size that is actually theunit for motion compensation, and the calculated motion vectors are notcoded. Then, the motion vector estimation unit 109 chooses either thecalculated motion vector or the motion vector (0, 0) to be used for each4×4-pixel block. The motion compensation unit 108 generates thepredictive image data “Pred” based on the coding mode “Mod” of thecurrent block to be coded and the motion vectors estimated by the motionvector estimation unit 109.

Further, when a motion vector indicates sub-pixel locations such as ahalf pixel and a quarter pixel, the motion compensation unit 108interpolates pixel values of the sub-pixel locations such as a halfpixel and a quarter pixel by using a low-pass filter and the like. Themotion vector storage unit 110 stores motion parameters “MotionParam”outputted from the motion vector estimation unit 109. The variablelength coding unit 103 performs variable length coding and the like tothe inputted coded residual data “CodedRes” and the motion parameters“MotionParam” outputted from the motion vector estimation unit 109 andgenerates coded data “Bitstream” by further adding the coding mode“Mod”.

The image decoding unit 104 performs decoding processes such as inversequantization and inverse frequency conversion to the inputted codedresidual data “CodedRes” and generates decoded residual data “ReconRes.”The addition unit 105 adds the decoded residual data “ReconRes”outputted from the image decoding unit 104 to the predictive image data“Pred” inputted from the motion compensation unit 108 and generatesdecoded image data “Recon.” The picture memory 106 stores the generateddecoded image data “Recon.”

When the motion amount of a photogenic subject is smaller than aninteger pixel unit, a predictive effect may improve if the prediction isperformed with a movement that is smaller than the integer pixel unit.Generally, pixel interpolation is used when calculating pixel values ofa predictive image with the movement that is smaller than the integerpixel unit. This pixel interpolation is performed by filtering pixelvalues of a reference picture with a linear filter (a low-pass filter).When increasing the number of taps of this linear filter, it is easierto realize a filter with good frequency characteristics and thereforethe predictive effect improves but a processing amount increases. On theother hand, when the number of taps of this linear filter is small, thefrequency characteristics become worse and therefore the predictiveeffect deteriorates but the processing amount decreases.

FIG. 2 is a diagram showing the structure of a conventional picturedecoding apparatus 200 that performs pixel interpolation. The picturedecoding apparatus 200 includes a variable length decoding unit 201, animage decoding unit 202, an addition unit 203, a picture memory 204, amotion vector storage unit 205 and a motion compensation unit 206.

The variable length decoding unit 201 extracts various data such as thecoded residual data “CodedRes”, motion parameters “MotionParam” andinformation of the coding mode “Mod” at the time of coding from theinputted coded data “Bitstream”. The image decoding unit 202 decodes theinputted coded residual data “CodedRes” and generates predictiveresidual image data “Res”. The motion vector storage unit 205 stores themotion parameters “MotionParam” extracted by the variable lengthdecoding unit 201. The motion compensation unit 206 includes an insidepixel interpolation unit (not illustrated) that interpolates pixelvalues of the sub-pixel locations such as a half pixel and a quarterpixel by using a linear filter and the like. The motion compensationunit 206 generates predictive image data “Pred” that is motioncompensation data from the decoded image data “Recon” in the picturememory 204 based on the coding mode “Mod” at the time of coding, motionparameters “MotionParam” and the like. At this time, in the case of thedirect mode, the motion compensation unit 206 generates the predictiveimage data “Pred” of the current block to be motion-compensated in thesame size with the block size of motion compensation of a standard blockin a standard picture, read out from the picture memory 204. Theaddition unit 203 adds the predictive residual image data “Res”outputted from the image decoding unit 202 to the predictive image data“Pred” that is motion compensation data outputted from the motioncompensation unit 206 and generates the decoded image data “Recon.” Thepicture memory 204 stores the generated decoded image data “Recon.”Refer to MPEG-4 Visual written standards (1999, ISO/IEC 14496-2: 1999Information technology—Coding of audio-visual objects-Part2: Visual)

To perform motion compensation of sub-pixel precision, however, it isnecessary to obtain pixel values of not only the current block to bemotion-compensated but also some adjacent pixels. In other words, togenerate pixel values of sub-pixel precision, it is necessary to obtainthe pixel values of a larger area than the actual block to be predicted.It is common practice to use a low-pass filter in order to generatepixel values by an interpolation process; it is necessary to access(read out) some adjacent pixels (pixels for a number of coefficients ofthe low-pass filter) to a target pixel in order to use the low-passfilter. FIGS. 3A and 3B are diagrams showing examples of a current blockto be motion-compensated and its adjacent pixels, whose pixel values arenecessary to be read out in order to generate a predictive image whenperforming pixel interpolation. FIG. 3A is a diagram showing the currentblock to be motion-compensated and its adjacent pixels when the currentblock to be motion-compensated is small. FIG. 3B is a diagram showingthe current block to be motion-compensated and its adjacent pixels whenthe current block to be motion-compensated is large. In FIGS. 3A and 3B,the central square shows one current block to be motion-compensatedwhile the surrounding hatched area shows the adjacent pixels whose pixelvalues are read out from a reference memory in order to perform pixelinterpolation. Here, for example, when a filter of 9 taps (pixel valuesof nine pixels are necessary) is assumed to be used as a low-passfilter, in order to perform low-pass filter process to pixels in theborder area of the block, it is necessary to obtain the pixel values ofat least four pixels outside the block and therefore a memory must beaccessed to read out the area including the pixel values of four pixelssurrounding the central current block to be motion-compensated. Forexample, in a 4×4-pixel block, it is necessary to read out the pixelvalues of (4+4+4)×(4+4+4)=144 pixels for each block. In an 8×8-pixelblock, it is necessary to read out the pixel values of(4+8+4)×(4+8+4)=256 pixels. When motion-compensating a 16×16-pixelmacroblock with an 8×8-pixel block as the unit, it is enough to read outthe pixel values of 256 pixels×4=1024 pixels but whenmotion-compensating the 16×16-pixel macroblock with a 4×4-pixel block asthe unit, it is necessary to read out the pixel values of 144pixels×16=2304 pixels. Consequently, the memory access amount of themotion compensation with an 8×8-pixel block as the unit is about half ofthat of four motion compensations with a 4×4-pixel block as the unit.

As is apparent from the above-mentioned example, when reading out thepixel values of the same number of external pixels surrounding onecurrent block to be motion-compensated, the smaller the size of thecurrent block to be motion-compensated, the larger the ratio of thenumber of pixels in adjacent blocks to the number of pixels in thecurrent block to be motion-compensated (concerning the number of pixelsread out from a reference memory). As a result, when reading out thepixel values of the current block to be motion-compensated from thereference memory, there is a problem that the load of memory access(access for reading out) becomes large by referring to the adjacentpixels that are not the target of motion compensation. Particularly,when performing the bi-predictive motion compensation of a B picturewhose pixel values are calculated by motion-compensating the currentpicture to be coded or decoded referring to two pictures at the sametime, the access to the reference memory becomes about double comparedwith unidirectional predictive motion compensation. Therefore, a problemof overhead becomes more prominent when the size of the current block tobe motion-compensated is small.

SUMMARY OF INVENTION

It is a first object of the present invention to provide a motioncompensation method for reducing the access to the reference memory.

Additionally, it is a second object of the present invention to providea picture coding method and a picture decoding method using the motioncompensation method.

To achieve the above-mentioned objects, the motion compensation methodaccording to the present invention is a motion compensation method forcoding or decoding an image signal, the motion compensation methodcomprising: a selection step of selecting one of methods for generatinga motion vector of a block in a current macroblock to be coded ordecoded, depending on a motion vector of a block located in a corner ofa coded or decoded macroblock among a group of blocks that compose thecoded or decoded macroblock corresponding to the current macroblock; anda motion compensation step of generating a predictive image of the blockin the current macroblock based on the motion vector generated by theselected method. Herewith, though a group of coded or decoded blocksthat compose a plurality of blocks corresponding to one current block tobe motion-compensated, by judging motion of one block located in thefour corners of the macroblock including said group of blocks, it ispossible to select a method for generating a motion vector used tomotion-compensate the current block to be motion-compensated.

Moreover, since the picture coding apparatus and the picture decodingapparatus motion-compensate with a larger size of the current block tobe motion-compensated as the unit, it is possible, for example, toreduce the overhead by access to a picture memory in coding and decodinga B picture using the bi-predictive motion compensation.

In addition, the present invention can be realized not only as a motioncompensation method, a picture coding method and a picture decodingmethod, but also as a picture coding apparatus and a picture decodingapparatus using the characteristic steps included in the these methods,and as a program for causing a computer to execute these steps.Additionally, it is needless to say that the program can be distributedthrough a recording medium such as a CD-ROM and a transmission mediumsuch as the Internet.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram showing the structure of a conventionalpicture coding apparatus 100.

FIG. 2 is a diagram showing the structure of a conventional picturedecoding apparatus 200 that performs pixel interpolation.

FIGS. 3A and 3B are diagrams showing examples of a current block to bemotion-compensated and its adjacent pixels, which are necessary to readout the pixel values of which in order to generate a predictive imagewhen performing pixel interpolation.

FIG. 4 is a diagram showing the structure of a picture coding apparatus300 according to one embodiment using the picture coding methodaccording to the present invention.

FIG. 5 is a block diagram showing the structure of a picture decodingapparatus 400 according to one embodiment using the picture decodingmethod according to the present invention.

FIG. 6A is a diagram showing a method for determining the motion vectorMV of the current macroblock to be coded or decoded using motion vectorsin the adjacent blocks when the adjacent blocks are motion-compensatedin the same block size as the current macroblock to be coded or decoded.

FIG. 6B is a diagram showing the correspondence between the currentblock to be motion-compensated and a block in a subsequent picture whichis co-located with the current block when the current macroblock to becoded or decoded and the block in a subsequent picture which isco-located with a current block are motion-compensated in the same blocksize.

FIG. 7 is a diagram showing a method for determining the motion vectorof the macroblock to be coded or decoded using motion vectors ofadjacent blocks when the adjacent blocks are motion-compensated in asmaller block size than the current block to be coded or decoded.

FIG. 8 is a flowchart showing a process for motion-compensating thecurrent block to be motion-compensated with a different method (adifferent motion vector) depending on a motion of the block in asubsequent picture co-located with the current block to bemotion-compensated when a current macroblock to be coded or decoded anda macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with the same block size.

FIG. 9 is a diagram showing the correspondence between the current blockto be motion-compensated and the plurality of blocks in a subsequentpicture which is co-located with the current block to bemotion-compensated when a current macroblock to be coded or decoded andthe macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated in different block sizes.

FIG. 10 is a flowchart showing a process for motion-compensating thecurrent block to be motion-compensated with a different method (adifferent motion vector) depending on a motion of the block in asubsequent picture co-located with the current block to bemotion-compensated when a current macroblock to be coded or decoded andthe macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with different block sizes.

FIG. 11 is a diagram showing the correspondence between the currentblock to be motion-compensated and the plurality of blocks in asubsequent picture which are co-located with the current macroblock tobe motion-compensated when the current macroblock to be coded or decodedand the macroblock in a subsequent picture which is co-located with acurrent block are motion-compensated in different block sizes in anotherembodiment.

FIG. 12 is a flowchart showing a process in the another embodiment formotion-compensating the current block to be motion-compensated with adifferent method (a different motion vector) depending on a motion ofthe block in a subsequent picture co-located with the current block tobe motion-compensated when the current macroblock to be coded or decodedand the macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with different block sizes.

FIG. 13A shows an example of a physical format of the flexible disk as amain body of a storing medium.

FIG. 13B shows a full appearance of a flexible disk, its structure atcross section and the flexible disk itself.

FIG. 13C shows a structure for recording and reading out the program onthe flexible disk FD.

FIG. 14 is a block diagram showing an overall configuration of a contentsupply system ex100 for realizing content distribution service.

FIG. 15 is a diagram showing the cell phone ex115 using the picturecoding method and the picture decoding method explained in theabove-mentioned embodiments.

FIG. 16 is a diagram showing a structure of a cell phone.

FIG. 17 is a diagram showing an example of a digital broadcastingsystem.

DETAILED DESCRIPTION OF THE INVENTION

The embodiments of the present invention will be explained in detailbelow with reference to FIGS. 4 to 17.

The First Embodiment

The first embodiment of the present invention will be explained indetail below with reference to the figures.

FIG. 4 is a diagram showing the structure of a picture coding apparatus300 according to one embodiment using a picture coding method accordingto the present invention. The picture coding apparatus 300 is a picturecoding apparatus that performs motion compensation of a B picture (to becoded) in a larger block size than the block size of motion compensationof a P picture referring to two pictures. The picture coding apparatus300 includes a difference unit 101, an image coding unit 102, a variablelength coding unit 103, an image decoding unit 104, an addition unit105, a picture memory 106, a picture memory 107, a motion vector storageunit 110, a motion information conversion unit 301, a motion vectorestimation unit 302 and a motion compensation unit 303.

The picture memory 107 stores image data “Img” that represents movingpictures inputted in the display order on a picture-by-picture basis.The difference unit 101 calculates the difference between the image data“Img” read out from the picture memory 107 and the predictive image data“Pred” inputted from the motion compensation unit 303 and generatespredictive residual image data “Res.” Here, in the case of intrapicturecoding, interpicture motion compensation is not performed. And thereforethe value of the predictive image data “Pred” is thought to be “0.” Theimage coding unit 102 performs coding processes such as frequencyconversion and quantization to the inputted predictive residual imagedata “Res” and generates the coded residual data “CodedRes.” When thecurrent picture to be coded is a B picture, the motion informationconversion unit 301 derives motion vectors and informs the motion vectorestimation unit 302 and the motion compensation unit 303 so that motioncompensation is performed in a predetermined block size. In other words,in the case of a B picture, under the condition accepting theunidirectional prediction mode, the bi-predictive mode and the directmode, the picture coding apparatus 300 performs motion compensation inthe bi-directional mode and the direct mode in a large block size (forexample, estimating motion vectors in a block size smaller than an8×8-pixel block is prohibited); in the case of a P picture, theunidirectional prediction in a small block size is allowed. Hereby,particularly in the bi-predictive mode that accesses the memory often,selection of motion vectors that refer to reference pictures in a smallblock size is incapable. Moreover, the motion information conversionunit 301 converts motion parameters of reference pictures stored in themotion vector storage unit 110 into motion parameters (such as motionvectors) with a predetermined block size (for example, an 8×8-pixelblock), or instructs the motion vector estimation unit 302 and themotion compensation unit 303 to make an interpretation of the motionparameters corresponding to this conversion.

Using the reference picture data “Ref” that is decoded data of codedpictures stored in the picture memory 106 as a reference picture, themotion vector estimation unit 302 estimates the motion vector thatindicates the location of the block predicted to be optimum in thesearch area in the reference picture, and outputs motion parameters“MotionParam” including the estimated motion vector. The motion vectorstorage unit 110 stores the motion parameters “MotionParam” outputtedfrom the motion vector estimation unit 302.

Furthermore, responding to whether the current picture to be coded is aP picture or a B picture, the motion vector estimation unit 302evaluates errors indicated by the cases of motion-compensating in thecoding modes “Mod,” and compares the motion compensation error when asearch is conducted in the reference picture with the motioncompensation error when deriving motion vectors in the direct mode, theunidirectional predictive mode and the bi-predictive mode. In otherwords, in the direct mode, depending on motion vectors, which areconverted by the motion information conversion unit 301 (converted, forexample, to a block size that is an 8×8 block or larger), and themotion-compensated block in a subsequent block which is co-located withthe current block to be motion-compensated, a motion vector in thecurrent block to be motion-compensated is selected from among aplurality of motion vectors. By the way, the direct mode is abi-predictive mode for calculating the motion vector of the currentblock to be motion-compensated using a motion vector derived fromanother block and for not coding the motion vector in the current blockto be motion-compensated. The size of the motion vector in the block ina subsequent picture co-located with a current block decides which oneof the derived motion vector and the motion vector (0, 0) is used. (Theinformation for identifying which one is selected is not coded.)Furthermore, the block in a subsequent picture which is co-located witha current block is the block (the standard block) in the nearestbackward picture (the standard picture) to the current picture to becoded in the display order. The motion compensation unit 303 generatesthe predictive image data “Pred” based on this coding mode “Mod” and themotion vector estimated by the motion vector estimation unit 302. In thedirect mode of a B picture, the motion compensation unit 303 generatespredictive pictures for each 8×8-pixel current block to bemotion-compensated, using the motion vector calculated by the motionvector estimation unit 302. In addition, when the motion vectorindicates sub-pixel locations such as a half pixel and a quarter pixel,the motion compensation unit 303 interpolates the sub-pixel locationssuch as a half pixel and a quarter pixel using a linear filter (alow-pass filter) and the like. In this case, since motion vectors withsmall block sizes are not selected by the motion vector estimation unit302 in the bi-predictive mode, the motion compensation unit 303 canperform motion compensation with relatively large block sizes that donot have many accesses in the bi-predictive mode. Additionally, in theunidirectional mode, the motion vector estimation unit 302 and themotion compensation unit 303 perform motion compensation that enablesmotion compensation with small block sizes. The variable length codingunit 103 performs variable length coding and the like to the inputtedcoded residual data “CodedRes” and the motion parameters “MotionParam”outputted from the motion vector estimation unit 302, and generates thecoded data “Bitstream” by further adding the coding mode “Mod.”

The image decoding unit 104 performs decoding processes such as inversequantization and inverse frequency conversion to the inputted codedresidual data “CodedRes” and generates decoded residual data “ReconRes.”The addition unit 105 adds the decoded residual data “ReconRes”outputted from the image decoding unit 104 to the predictive image data“Pred” inputted from the motion compensation unit 303 and generates thedecoded image data “Recon.” The picture memory 106 stores the generateddecoded image data “Recon”.

FIG. 5 is a block diagram showing the structure of a picture decodingapparatus 400 according to one embodiment using the picture decodingmethod according to the present invention. The picture decodingapparatus 400 includes a variable length decoding unit 201, an imagedecoding unit 202, an addition unit 203, a picture memory 204, a motionvector storage unit 205, a motion information conversion unit 401 and amotion compensation unit 402.

The variable length decoding unit 201 extracts various data such as thecoded residual data “CodedRes”, motion parameters “MotionParam” andinformation of the coding mode “Mod” used at the time of coding from theinputted coded data “Bitstream.” The image decoding unit 202 decodes theinputted coded residual data “CodedRes” and generates predictiveresidual image data “Res.” The motion information conversion unit 401converts motion parameters of reference pictures read out from themotion vector storage unit 205 into motion parameters (such as motionvectors) with the predetermined block size (for example, an 8×8-pixelblock) or instructs the motion compensation unit 402 to make aninterpretation of the motion parameters corresponding to thisconversion. The motion compensation unit 206 includes an inside pixelinterpolation unit (not illustrated) that interpolates pixel values ofthe sub-pixel locations such as a half pixel and a quarter pixel byusing a linear filter and the like. The motion compensation unit 206generates the predictive image data “Pred” that is motion compensationdata from the decoded image data “Recon” in the picture memory 204 basedon the coding mode “Mod” at the time of coding, motion parameters“MotionParam” and the like. At this time, when the current macroblock tobe decoded is coded in the direct mode, motion vectors for generatingthe predictive image data “Pred” are not coded. Consequently, the motioncompensation unit 402 calculates motion vectors in the current block tobe motion-compensated using motion vectors converted by the motioninformation conversion unit 401 (converted, for example, to a block sizethat is an 8×8 block or larger) and motion vectors derived in blocksadjacent to the current block to be decoded, and generates thepredictive image data “Pred” on a block-by-block basis, the block beingthe current block to be motion-compensated (for example, an 8×8-pixelblock) with the size that is larger than the smallest block size of a Ppicture. The motion vector storage unit 205 stores the motion parameters“MotionParam” extracted by the variable length decoding unit 201. Theaddition unit 203 adds the predictive residual image data “Res”outputted from the image decoding unit 202 to the predictive image data“Pred” that is motion picture compensation data outputted from themotion compensation unit 206 and generates the decoded image data“Recon.” The picture memory 204 stores the generated decoded image data“Recon.”

Hereinafter, the picture coding apparatus 300 and the picture decodingapparatus 400 constructed as described above are explained.

In the present embodiment, in the direct mode of a B picture, the motionvector estimation unit 302 in the picture coding apparatus 300 and themotion compensation unit 402 in the picture decoding apparatus 400select a motion vector used for motion-compensating the current block tobe motion-compensated from among a plurality of vectors depending onmotion vectors of the motion-compensated block in a subsequent picturewhich is co-located with the current block to be motion-compensated. Forexample, the motion vector compensation unit 302 or the motioncompensation unit 402 selects as a motion vector of the currentmacroblock to be coded or decoded either the motion vector (0, 0) or themotion vector being calculated using motion vectors of adjacent blocksthat have been already coded or decoded in the pictures to be coded ordecoded, and determines that the selected motion vector to be the motionvector in the current block to be motion-compensated. The adjacentblocks are the blocks that have been already coded or decoded in thesame current picture to be coded and are neighboring blocks to thecurrent macroblock to be coded or decoded. Hereinafter, regarding themotion compensation method in the direct mode using motion vectors inthe adjacent blocks that have been already determined and motionparameters in a backward reference picture, the processes in the picturecoding apparatus 300 are explained first.

FIG. 6A is a diagram showing a method for determining the motion vectorMV of the current macroblock to be coded or decoded using motion vectorsin the adjacent blocks when the adjacent blocks are motion-compensatedin the same 16×16-pixel block size as the current macroblock. FIG. 6B isa diagram showing the correspondence between the current block to bemotion-compensated and the block in a subsequent picture which isco-located with a current block to be coded or decoded when the currentmacroblock and the block in a subsequent picture which is co-locatedwith a current block are motion-compensated in the same block size. FIG.7 is a diagram showing a method for determining the motion vector of thecurrent macroblock using motion vectors of adjacent blocks when theadjacent blocks are motion-compensated in a smaller block size than thecurrent block. FIG. 8 is a flowchart showing a process formotion-compensating the current block to be motion-compensated with adifferent method (a different motion vector) depending on a motion ofthe block in a subsequent picture co-located with the current block tobe motion-compensated when a current macroblock to be coded or decodedand the macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with the same block size.

First, a case where the current block to be motion-compensated in thecurrent picture to be coded B1 and the block in a subsequent pictureco-located with the current block to be motion-compensated in thebackward P picture P2 are of the same size and have a one-to-onecorrespondence is explained. The motion information conversion unit 301judges whether the size of motion compensation of the block in asubsequent picture which is co-located with the current block to bemotion-compensated is the same as the size of the current block to bemotion-compensated. When they are same, the motion informationconversion unit 301 instructs the motion vector estimation unit 302 tocalculate the motion vector of the current block to bemotion-compensated following the procedure shown in the flowchart ofFIG. 8. As is shown in the flowchart of FIG. 8, the motion vectorestimation unit 302, first, judges whether “the motion is small” or notin the block co-located with the current block to be motion-compensated(the standard block) in the picture P2 that is a P picture (a standardpicture) following the current picture to be coded B1 shown in FIG. 6B.In other words, a P picture displayed temporally later than the pictureB1 and is neighboring to the picture B1 (S401), and when “the motion issmall,” the motion vector in the current block to be motion-compensatedis determined to be (0, 0), step (S402). In other words, to this currentblock to be motion-compensated, the motion compensation using aninterpicture prediction is performed determining that the motion vectoris (0, 0). Here, “the motion is small” means that the block is codedreferring to the nearest picture to the picture in which the block isincluded and the size (the absolute value) of the motion vector iswithin “1.” But it is acceptable that “the motion is small” simply whenthe size of the motion vector is the predetermined value or less.Additionally, it is also acceptable that “the motion is small” whendetermining that the particular picture is the reference picture.

On the other hand, when “the motion is NOT small” in the blockco-located with the current block to be motion-compensated in a backwardP picture, in other words, either when the standard block is not codedreferring to the nearest picture or when the size of the motion vectorexceeds “1,” the motion vector estimation unit 302 determines that themotion vector MV in the current macroblock to be coded that iscalculated using motion vectors in the blocks adjacent to the currentmacroblock to be coded is the motion vector in the current block to bemotion-compensated, step (S404). By the way, in an explanation below,both of Picture PO and Picture P2 are determined to be the nearestpictures to Picture B1.

To calculate the motion vector MV of the current macroblock to be coded,the motion vector estimation unit 302, first, chooses three coded blocks(adjacent blocks) neighboring to the current macroblock to be coded.Since the standard and the method for the selection are not importanthere, their explanations are omitted. FIG. 6A shows the three selectedblocks adjacent to the current macroblock to be coded. As is shown inFIG. 6A, in the macroblock located over the current macroblock to becoded, the motion vector MV2 has been already determined; in themacroblock located upper right to the current macroblock to be coded,the motion vector MV3 has been already determined. Moreover, in themacroblock located left to the current macroblock to be coded, themotion vector MV1 has been already determined. The motion vectorestimation unit 302 determines the motion vector MV of the currentmacroblock to be coded using these motion vectors, MV1, MV2 and MV3. Forexample, the motion vector referring to the temporally nearest pictureto the current picture to be coded from among the motion vectors, MV1,MV2 and MV3, is determined to be a candidate for the motion vector MV inthe current macroblock to be coded. Here, “the temporally nearestpicture to the current picture to be coded” means the forward andnearest picture to the current picture to be coded when predicting themotion vector in the current macroblock to be coded referring to aforward picture, and the backward and nearest picture to the currentpicture to be coded when predicting the motion vector of the currentmacroblock to be coded referring to a backward picture. At this time,the motion vector estimation unit 302 determines that:

(1) the motion vector MV of the current macroblock to be coded is (0, 0)when there is no motion vector referring to the temporally nearestpicture to the current picture to be coded;

(2) the candidate is the motion vector MV in the macroblock when thereis one motion vector referring to the temporally nearest picture to thecurrent picture to be coded; and

(3) the median of the three motion vectors in the adjacent blocks is themotion vector MV of the current macroblock to be coded when there aretwo or more motion vectors determining that the motion vector in theadjacent block that does not refer to the nearest picture is (0, 0).

Up to now, the case that the adjacent blocks to the current macroblockto be coded is motion-compensated in the same size as the current blockto be coded is explained using FIG. 6A. As is shown in FIG. 7, however,even when the adjacent blocks are motion-compensated in a differentblock size from and a smaller block size than that of the currentmacroblock to be coded, it is also possible to similarly calculate themotion vector MV in the current macroblock to be coded. In FIG. 7, thecase that motion vectors are estimated with a 4×4-pixel block as theunit in the adjacent blocks toward a 16×16-pixel current macroblock tobe coded is explained. In a case like this, to calculate the motionvector MV of the current macroblock to be coded, the motion vectorestimation unit 302, first, selects the three adjacent blocks (the blockA, the block B and the block C).

The Block A, for example, belongs to the macroblock located left to thecurrent macroblock to be coded and touches the upper left corner of thecurrent macroblock to be coded. Furthermore, the block B, for example,belongs to the macroblock located over the current macroblock to becoded and touches the upper left corner of the current macroblock to becoded. Further, the block C, for example, belongs to the macroblocklocated upper right to the current macroblock to be coded and touchesthe upper right corner of the current macroblock to be coded.

For the blocks A, B and C, the motion vectors MV1, MV2 and MV3 have beenalready determined, respectively. The motion vector estimation unit 302applies the above-mentioned determinations (1), (2) and (3) to themotion vectors, MV1, MV2 and MV3 and can determine the motion vector MVin the current macroblock to be coded similar to the case that thecurrent macroblock to be coded and the adjacent blocks aremotion-compensated in the same size. Regarding each current block to bemotion-compensated in the current macroblock to be coded, as alreadyexplained, depending on whether “the motion is small” or not in theblock in a subsequent picture which is co-located with a current block,the motion vector estimation unit 302 selects either the motioncompensation using the motion vector (0, 0) or the motion compensationusing the motion vector MV.

As is described above, when the motion vector of the current block to bemotion-compensated is determined, the motion compensation unit 303generates the predictive image data “Pred” from the reference picturedata “Ref” in the picture memory 106 using the determined motion vector,step (S403).

Up to now, the case that the block in a subsequent picture which isco-located with the current block to be motion-compensated ismotion-compensated in the same block size with the current block to bemotion-compensated is explained. Hereinafter, the case that the block ina subsequent picture which is co-located with the current block to bemotion-compensated is motion-compensated in a different block size fromthat of the current block to be compensated is explained. In the picturecoding apparatus 300, when performing the bi-predictive motioncompensation of a B picture, the motion compensation unit 303 and themotion vector estimation unit 302 perform motion compensation targetingat blocks with a predetermined size (for example, 8×8-pixel blocks) thatis larger than the smallest (4×4-pixel) block that can be a target blockfor unidirectional predictive motion compensation. Consequently, when abackward reference picture of a picture that is motion-compensatedbi-predictively is motion-compensated unidirectionally, the case thatthe block in a subsequent picture which is co-located with the currentblock to be motion-compensated is motion-compensated in a smaller blocksize than that of the current block to be motion-compensated may occur.

FIG. 9 is a diagram showing the correspondence between the current blockto be motion-compensated and the plurality of blocks in a subsequentpicture which is co-located with the current block to bemotion-compensated when a current macroblock to be coded or decoded andthe macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated in different block sizes. Inthe left side of FIG. 9 is shown a current macroblock to be coded in thecurrent B picture to be coded; in the right side of FIG. 9 is shown themacroblock in the subsequent picture which is co-located with thecurrent macroblock to be coded in the nearest backward picture (a Ppicture or a B picture) to the current B picture. The size of themacroblocks is the same and 16 pixels×16 pixels, for example. Themacroblock in a subsequent picture shown in the right side of FIG. 9,which is co-located with a current macroblock is coded earlier than acurrent picture and is assumed to be already motion-compensated with a4×4-pixel block (the smallest lot in the figure), for example, as theunit.

FIG. 10 is a flowchart showing a process for motion-compensating thecurrent block to be motion-compensated with a different method (adifferent motion vector) depending on a motion of the block in asubsequent picture co-located with the current block to bemotion-compensated when a current macroblock to be coded or decoded andthe macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with different block sizes.The motion information conversion unit 301, first, judges whether theblock in a subsequent picture which is co-located with the current blockto be motion-compensated and the current block to be motion-compensatedare motion-compensated in the same block size or not. When they are notmotion-compensated in the same block size, the motion informationconversion unit 301 instructs the motion vector estimation unit 302 tocalculate the motion vector in the current block to bemotion-compensated following the procedure shown in the flowchart ofFIG. 10. Here, since the size of the current block to bemotion-compensated is 8 pixels×8 pixels and the block in a subsequentpicture which is co-located with the current block to motion-compensatedwith a 4×4-pixel size. The motion vector estimation unit 302 calculatesthe motion vector in the current block to be motion-compensatedfollowing the flowchart shown in FIG. 10.

In the flowchart shown in FIG. 10, the process in Step S501 is differentfrom the process in Step S401 shown in the flowchart in FIG. 8. As isshown in FIG. 9, in the motion compensation method according to thepresent invention, one current block to be coded is motion-compensatedin each unit of four current blocks to be motion-compensated. Assumethem to be, for example, the current block to be motion-compensated a,the current block to be motion-compensated, block b, the current blockto be motion-compensated c and the current block to bemotion-compensated d. To these current blocks to be motion-compensated,in the macroblock in a subsequent picture which is co-located with acurrent macroblock, the block a′, the block b′, the block c′ and theblock d′ correspond, respectively. Each of these blocks a′, b′, c′ andd′ is further composed of four 4×4-pixel current blocks to bemotion-compensated. The motion vector estimation unit 302, first,identifies the block a′ in the macroblock in a subsequent picture whichis co-located with and corresponds to the current block a to bemotion-compensated in the current macroblock to be coded and judgeswhether “the motion is small” or not in two or more current blocks to bemotion-compensated out of the four current blocks to bemotion-compensated that compose the block a′ (S501).

The standard for judging whether “the motion is small” or not in thecurrent blocks to be motion-compensated is similar to that of Step S401in the flowchart shown in FIG. 8. When “the motion is small” in two ormore current blocks to be motion-compensated, the motion vectorestimation unit 302 determines that the motion vector of the currentblock to be motion-compensated in the current macroblock to be coded is(0, 0), step (S502); the motion compensation unit 303 performs motioncompensation using the determined motion vector (0, 0), step (S502).When “the motion is NOT small” in two or more blocks, in other words,when the number of the current blocks to be motion-compensated whose“motion is small” is less than two, the motion vector estimation unit302 determines the motion vector MV of the current macroblock to becoded using motion vectors of adjacent blocks to the current macroblockto be coded, step (S504). The process for determining the motion vectorMV of the current macroblock to be coded using the motion vectors of theadjacent blocks is similar to that of Step S404 in FIG. 8. The motioncompensation unit 303 generates the motion compensation predictive pixelvalues of the current block to be motion-compensated a using the motionvector MV determined like this, step (S503).

The motion compensation unit 303, the motion vector estimation unit 302and the motion information conversion unit 301 repeat the processes ofthe above-mentioned Steps S501˜S504 to the remaining current blocks tobe motion-compensated, blocks b, c and d, and complete the motioncompensation to the current macroblock to be coded when performing themotion compensation to all the current blocks to be motion-compensated,a, b, c and d.

On the other hand, the picture decoding apparatus 400 decodes the codeddata “Bitstream” coded by the picture coding apparatus 300. In thedirect mode, the picture decoding apparatus 400 can motion-compensateeach current block to be motion-compensated similarly to the picturecoding apparatus 300 because the motion information conversion unit 401performs the process corresponding to that of the motion informationconversion unit 301 in the picture coding apparatus 300 and the motioncompensation unit 402 performs the processes corresponding to those ofthe motion vector estimation unit 302 and the motion compensation unit300 in the picture coding apparatus 300.

Additionally, when it is indicated in the coding mode “Mod” extractedfrom the coded data “Bitstream” by the variable length decoding unit 201that current macroblocks to be decoded is coded in the direct mode, themotion information conversion unit 401 judges whether the size of themotion-compensated block in a subsequent picture which is co-locatedwith a current block to be motion-compensated is the same as the size ofthe current block to be motion-compensated; when they are same, themotion information conversion unit 401 instructs the motion vectorestimation unit 402 to calculate the motion vector of the current blockto be motion-compensated following the procedure shown in the flowchartof FIG. 8.

Following this instruction, the motion vector estimation unit 402,first, judges whether “the motion is small” or not in themotion-compensated block in a P picture (a backward reference picture)P2 which is co-located with the current block to be motion-compensatedfollowing the current picture to be decoded B1 shown in FIG. 6B, step(S401), and when “the motion is small”, the motion vector in the currentblock to be motion-compensated is determined to be (0, 0), step (S402).In other words, to this current block to be motion-compensated, themotion compensation using an inter picture prediction is not performed.On the other hand, when “the motion is NOT small” in themotion-compensated block in a backward P picture which is co-locatedwith the current block to be motion-compensated, the motion vectorestimation unit 402 determines that the motion vector MV of the currentmacroblock to be decoded that is calculated using motion vectors of theblocks adjacent to the current macroblock to be decoded is the motionvector of said current block to be motion-compensated (S404). The methodfor calculating the motion vector of the current macroblock to bedecoded using the motion vectors in the decoded adjacent blocks is thesame as the method explained in the case of the picture coding apparatus300.

When the motion vector of the current block to be motion-compensated isdetermined in Step S402 or Step S404, the motion compensation unit 402reads out the block whose location is shown by the determined motionvector out of the reference picture data “Ref” in the picture memory 204and generates the predictive image data “Pred,” step (S403). As isdescribed above, although the current block to be motion-compensated andthe motion-compensated block in a subsequent picture which is co-locatedwith the current block to be motion-compensated are motion-compensatedin the same block size, the motion compensation unit 402 can determinethe motion vector for each current block to be motion-compensated andperform motion compensation, depending on whether “the motion is small”or not in the current block to be motion-compensated in a subsequentpicture which is co-located with a current block.

Additionally, when it is indicated that the current macroblock to bedecoded is coded in the direct mode in the extracted coding mode “Mod”and when the current block to be motion-compensated and themotion-compensated block in a subsequent picture which is co-locatedwith the current block to be motion-compensated are notmotion-compensated in the same block size, the motion informationconversion unit 401 instructs the motion compensation unit 402 tocalculate the motion vector of the current block to bemotion-compensated following the procedure shown in the flowchart ofFIG. 10. In the macroblock (in a subsequent P picture) which isco-located with the current macroblock to be decoded (in the currentpicture to be decoded and to which the subsequent P picture is nearest),the motion compensation unit 402 examines the motion of four 4×4-pixelmotion-compensated blocks included in an 8×8-pixel block correspondingto a current 8×8-pixel block to be motion-compensated and determines themotion vector of the current block to be motion-compensated to be (0, 0)when “the motion is small” in two or more motion-compensated blocks outof the four, step (S502). When it is not the case, the motioncompensation unit 402 determines the motion vector MV of the currentmacroblock to be decoded, which is calculated using the motion vectorsof adjacent blocks to the current macroblock to be decoded, to be themotion vector of the current block to be motion-compensated, step(S504). When the motion vector of the current block to bemotion-compensated is determined in Step S502 or Step S504, the motioncompensation unit 402 reads out the block whose location is shown by thedetermined motion vector of the reference picture data “Ref” in thepicture memory 204 and generates the predictive image data “Pred.”Hereby, although the current block to be motion-compensated and themotion-compensated block in a subsequent picture which is co-locatedwith the current block to be motion-compensated are motion-compensatedin different block sizes, the motion compensation unit 402 can judgewhether “the motion is small” or not in the motion-compensated block ina subsequent picture which is co-located with a current block.Consequently, the motion compensation unit 402 can, depending on thisjudgment result, determine the motion vector of each current block to bemotion-compensated and perform motion compensation to the current blockto be motion-compensated.

As described above, since the picture coding apparatus 300 and thepicture decoding apparatus 400, using the motion compensation methodaccording to the present invention, perform motion compensation with alarger-sized current block to be motion-compensated than theconventional current block to be motion-compensated as the unit, inmotion-compensation coding a B picture, the load by access to thepicture memory in coding and decoding the B picture can be reduced.

By the way, in the above-described First Embodiment, the size of acurrent block to be motion-compensated of a B picture is explained to be8 pixels×8 pixels and the size of a motion-compensated block of a Ppicture is explained to be 4 pixels×4 pixels but the present inventionis not limited to these sizes and it is acceptable to decide ondifferent sizes from these sizes. Moreover, when “the motion is small”in two or more motion-compensated blocks of the blocks corresponding tothe current blocks to be motion-compensated in the nearest subsequentpicture to a current picture, the motion vector of the current block tobe motion-compensated is determined to be (0, 0), but it is notnecessarily “two or more” and it is satisfactory to be “one or more” or“three or more” or “all.” Furthermore, when current blocks to bemotion-compensated and their sizes are decided to be other than theabove-described, it is acceptable to decide appropriately according tothe proportion of these block sizes. This is also applicable to thefollowing embodiments.

Further, in the First Embodiment, in the flowchart shown in FIG. 8 orFIG. 10, the motion vector determined based on motion vectors ofadjacent blocks is one for one current macroblock to be coded ordecoded. Consequently, when the process of Step S404 or Step S504 isperformed to the current block to be motion-compensated in the samecurrent macroblock, the same calculation process is repeated every timeas a result. However, the present invention is not limited to this. Itis satisfactory, for example, to determine the motion vector in advancebased on motion vectors of adjacent blocks for each current macroblock,in other words, to perform the process of Step S404 or Step S504 beforethe judgment in Step S401 or Step S501 and to simply “use the value ofthe motion vector determined in advance based on the motion vectors ofthe adjacent block as the motion vector of the current block to bemotion-compensated” in Step S404 or Step S504. Hereby, when “the motionis NOT small” in the block in a subsequent picture which is co-locatedwith the current block to be motion-compensated, the effect is to lessenthe number of calculations of the motion vector based on the motionvectors of the adjacent blocks and to reduce the processing load of themotion vector estimation unit 302, and the motion compensation unit 402is achieved. This is also applicable to the following embodiments.

Furthermore, instead of performing the process of Step S401 or Step S501before the judgment of Step S401 or Step S501, it is acceptable to hold,in a memory and the like, the motion vector MV of the current macroblockto be code/decoded that is calculated by the process of Step S404 orStep 504 when the process of Step S404 or Step S504 is performed. Theduration for holding the motion vector MV is the duration for processingcurrent blocks to be motion-compensated in the same current macroblock.Specifically, it is satisfactory that the motion vector estimation unit303 or the motion compensation unit 402 calculates the motion vector ofthe current macroblock only when “the motion is NOT small” in the blockin a subsequent picture which is co-located with the current block to bemotion-compensated in the current macroblocks and holds the motionvector MV of the current macroblock while the current blocks to bemotion-compensated in the same current macroblock to be coded ordecoded. Hereby, the effect to further lessen the number of calculationsby the motion vector estimation unit 302 and the motion compensationunit 402 and to further reduce the processing load of the motion vectorestimation unit 302 and the motion compensation unit 402 is achieved.

Additionally, in the First Embodiment, it is described that in Step S404or Step S504 in the flowchart of FIG. 8 or FIG. 10, the motion vector ofthe current macroblock to be coded or decoded is determined using motionvectors of adjacent blocks, but it is not necessary to determine themotion vector MV of the current block to be coded or decoded by thismethod. For example, it is acceptable that the motion vector of thecurrent macroblock is determined using the motion vector of the block ina picture which is co-located with the current macroblock in anotherpicture whose motion vector has been determined in advance. This is alsoapplicable to the following embodiments.

In addition, in the First Embodiment, it is explained that the motioninformation conversion unit 301 converts a motion parameter of areference picture into a parameter with a predetermined block size afterthe motion parameter of the reference picture is stored in the motionvector storage unit 110 but it is satisfactory that the motioninformation conversion unit 301 performs the conversion before themotion parameter of the reference picture is stored in the motion vectorstorage unit 110. This is also applicable to the following embodiments.For example, when a motion parameter of a reference picture is estimatedwith a 4×4-pixel block as the unit for motion compensation, the motioninformation conversion unit 301 rewrites all the values of the motionvectors, MV1, MV2, MV3 and MV4 estimated in four 4×4-pixel blockscontained in the 8×8-pixel block into the value of one 4×4-pixel block,MV1, in the 8×8-pixel block, located in the four corners of the16×16-pixel macroblock. Hereby, all the four 4×4-pixel blocks obtainedby dividing the macroblock into four 8×8-pixel blocks and furtherdividing each 8×8-pixel block into four, have the same motion vectors asthe motion vectors estimated for four 4×4-pixel blocks, in the 8×8-pixelblock, located in the four corners of the macroblock. By storing amotion parameter converted like this in the motion vector storage unit110, when the motion vector estimation unit 302 reads out the motionvector of any one of the four 4×4-pixel blocks included in the block ina subsequent picture which is co-located with the current block, themotion vector estimation unit 302 can easily judge the motion of theblock in a subsequent picture which is co-located with a current block.

Additionally, it is acceptable that when the motion parameter of areference picture is estimated with a 4×4-pixel block as the unit ofmotion compensation, for example, the motion information conversion unit301 associates one motion vector, for example, MV1, with each 8×8-pixelblock obtained by dividing a 16×16 macroblock into four, and stores theone motion vector in the motion vector storage unit 110. This is alsoapplicable to the following embodiments. This motion vector is themotion vector and the like estimated for the four 4×4-pixel blocks, inthe 8×8-pixel block, located in the four corners of the 16×16-pixelmacroblock. Hereby, although the motion parameter of the referencepicture is estimated with a 4×4-pixel block as the unit of motioncompensation, the motion vector estimation unit 302 can judge whether“the motion is small” or not in the block in a subsequent picture whichis co-located with a current block with a similar process to the processshown in FIGS. 6A and 8.

Further, it is satisfactory that when the motion parameter of areference picture is estimated with a 4×4-pixel block as the unit ofmotion compensation, for example, the motion information conversion 301judges whether “the motion is small” or not in the four 4×4-pixelblocks, in the 8×8-pixel block, located in the four corners of the16×16-pixel macroblock and stores the flag indicating the judgmentresult associated with each 8×8-pixel block in the current macroblock tobe coded in the motion vector storage unit 110. This is also applicableto the following embodiments. Hereby, it is not necessary for the motionvector estimation unit 302 to judge whether “the motion is small” or notin the block in a subsequent picture which is co-located with a currentblock when motion-compensating a B picture, and the effect to reduceprocessing load for motion-compensating a B picture is achieved.

The Second Embodiment

In the Second Embodiment that is explained next, when the currentmacroblock to be coded or decoded and the macroblock in a subsequentpicture which is co-located with the current macroblock aremotion-compensated in different sizes, the judgment method for selectingeither determining the motion vector of the current block to bemotion-compensated to be (0, 0) or determining the motion vector of thecurrent block to be motion-compensated using the motion vectors of theadjacent blocks, is different from the judgment method of the FirstEmbodiment. When the current macroblock and the macroblock in asubsequent picture which is co-located with the current macroblock aremotion-compensated in the same block size, motion compensation of acurrent block to be motion-compensated is performed using the methodsexplained in FIGS. 6A, 6B, 7 and 8 of the First Embodiment.Consequently, in respect to the structure, the principally differentparts between the picture coding apparatus/the picture decodingapparatus according to the Second Embodiment and the picture codingapparatus 300/the picture decoding apparatus 400 indicated in the FirstEmbodiment, are the motion information conversion unit and the motionvector estimation unit in the picture coding apparatus, and the motioninformation conversion unit and the motion compensation unit in thepicture decoding apparatus. The explanations of overlapping componentsare omitted below.

FIG. 11 is a diagram showing the correspondence between the currentblock to be motion-compensated and the plurality of blocks in asubsequent picture which are co-located with the current block to bemotion-compensated when the current macroblock to be coded/decoded andthe macroblock in a subsequent picture which is co-located with acurrent macroblock are motion-compensated in different block sizes inthe Second Embodiment. In the left side of FIG. 11 is shown a currentmacroblock to be coded or decoded in the current B picture to be codedor decoded, similarly to FIG. 9. In the right side of FIG. 11 is shownthe macroblock in a subsequent picture which is co-located with thecurrent macroblock, similarly to FIG. 9. The picture to which themacroblock, shown in the right side of FIG. 11, in a subsequent picturewhich is co-located with a current macroblock belongs is a P picture ora B picture; for example, motion vector estimation and motioncompensation have been already performed to the macroblock with a4×4-pixel block (the smallest lot in FIG. 11) as the unit. To thecurrent macroblock shown in the left side of FIG. 11, similarly to FIG.9, motion vector determination and motion compensation is performed withan 8×8-pixel block as the unit.

As is shown in FIG. 11, one current macroblock to be coded or decoded iscomposed of four current blocks to be motion-compensated. When the fourcurrent blocks to be motion-compensated are called, for example, to bethe current blocks to be motion-compensated a, b, c and d, in themacroblock in a subsequent picture which are co-located with a currentblock, four 8×8-pixel blocks, each of which is composed of fourmotion-compensated 4×4-pixel blocks, correspond to each the currentblock to be motion-compensated.

FIG. 12 is a flowchart showing a process in the Second Embodiment formotion-compensating the current block to be motion-compensated with adifferent method (a different motion vector) depending on a motion ofthe block in a subsequent picture co-located with the current block tobe motion-compensated when a current macroblock to be coded or decodedand a macroblock in a subsequent picture which is co-located with thecurrent macroblock are motion-compensated with different block sizes. Asalready explained, in the motion compensation method according to theSecond Embodiment, since only the judgment method for selecting themotion vector of the current block to be motion-compensated isdifferent, only the process in Step S701 of FIG. 12 is different fromthe process in Step S501 of FIG. 10.

First, the motion information conversion unit judges whether the size ofmotion compensation in the block in a subsequent picture which isco-located with the current block to be motion-compensated is the sameas the size of the current block to be motion-compensated or not. Whenthey are same, the motion information conversion unit instructs themotion vector estimation unit to calculate the motion vector of thecurrent block to be motion-compensated following the procedure shown inthe flowchart of FIG. 8. On the contrary, when the motion compensationis not performed in the same block size, the motion informationconversion unit instructs the motion vector estimation unit or themotion estimation unit to calculate the motion vector of the currentblock to be motion-compensated.

The motion vector estimation unit or the motion compensation unit judgeswhether “the motion is small” or not in the motion-compensated block a′located in a corner of the macroblock in a subsequent picture which isco-located with a current block out of the four motion-compensatedblocks that compose the block in the macroblock in a subsequent picturewhich is co-located with a current macroblock, the block a′corresponding to the motion-compensated block a in the currentmacroblock, step (S701).

The standard for judging whether “the motion is small” or not in themotion-compensated block a′ is similar to that in Step S401 shown inFIG. 8. When “the motion is small” in the motion-compensated block a′,the motion vector estimation unit or the motion vector compensation unitdetermines that the motion vector of the current block to bemotion-compensated in the current macroblock to be coded or decoded is(0, 0), step (S702). The motion compensation unit motion-compensates thecurrent block to be motion-compensated a using the determined motionvector (0, 0), step (S703).

When “the motion is NOT small” in the current block to bemotion-compensated a′, using the motion vectors of the adjacent blocksto the current block to be coded or decoded, the motion vectorestimation unit or the motion compensation unit determines the motionvector MV of the current macroblock, step (S704). The process fordetermining the motion vector MV of the current macroblock using themotion vectors of the adjacent blocks is similar to the process in StepS404 of FIG. 8. The motion compensation unit generates the motioncompensation predictive pixel values of the current block to bemotion-compensated a using the motion vector MV determined like this,step (S703). By the process described above, the motion compensation ofone current block to be motion-compensated has been completed.

The motion vector estimation unit, the motion compensation unit and themotion information conversion unit in the picture coding apparatusaccording to the Second Embodiment and the motion compensation unit andthe motion information conversion unit in the picture decoding apparatusaccording to the Second Embodiment subsequently repeats the process ofthe above-mentioned Steps S701˜S704 to the remaining current blocks tobe motion-compensated, blocks b, c and d and complete motioncompensation to one current macroblock to be coded or decoded.

In other words, regarding the current block to be motion-compensated,block b, the motion vector estimation unit judges whether “the motion issmall” or not in the motion-compensated block b′, in the block in asubsequent picture which is co-located with the current block to bemotion-compensated, block b, located in a corner of the macroblock in asubsequent picture which is co-located with the current macroblock, andselects the motion vector (0, 0) when “the motion is small” in themotion-compensated block b′. When “the motion is NOT small” in themotion-compensated block b′, the motion vector estimation unit selectsthe motion vector MV of the current macroblock using the motion vectorsof the adjacent blocks. The motion compensation unit performs motioncompensation to the current block to be motion-compensated, block b,using the selected motion vector.

Additionally, similar to the current blocks to be motion-compensated,blocks c and d, the motion vector estimation unit selects the motionvector depending on the motion of the motion-compensated blocks c and d,and the motion compensation unit motion-compensates the current blocksto be motion-compensated, blocks c and d. Herewith, when the picturecoding apparatus and the picture decoding apparatus perform motioncompensation to all the current blocks to be motion-compensated in thecurrent macroblock, the picture coding apparatus and the picturedecoding apparatus complete motion compensation to the currentmacroblock to be coded or decoded.

As is described above, by the motion compensation method according tothe Second Embodiment, since it is possible to select the motion vectorused for motion-compensating the current block to be motion-compensatedonly by examining the motion of one motion-compensated block located ina corner of the macroblock in a subsequent picture which is co-locatedwith a current macroblock, the effect to reduce the processing load ofthe motion vector estimation unit or motion compensation unit comparedwith the motion compensation method according to the First Embodiment isachieved.

The Third Embodiment

Furthermore, it is possible to easily perform the processing shown inthe above embodiments in an independent computing system by recording aprogram for realizing the picture coding method and the picture decodingmethod shown in the above-mentioned embodiments onto a storage mediumsuch as a flexible disk.

FIG. 13 is an illustration of a recoding medium for storing a programfor realizing the First and Second Embodiments by a computer system.

FIG. 13B shows a full appearance of a flexible disk, its structure atcross section and the flexible disk itself; whereas FIG. 13A shows anexample of a physical format of the flexible disk as a main body of astoring medium. A flexible disk FD is contained in a case F, a pluralityof tracks Tr are formed concentrically from the periphery to the insideon the surface of the disk, and each track is divided into 16 sectors Sein the angular direction. Therefore, as for the flexible disk storingthe above-mentioned program, data as the aforementioned program isstored in an area assigned for it on the flexible disk FD.

FIG. 13 C shows a structure for recording and reading out the program onthe flexible disk FD. When the program is recorded on the flexible diskFD, the computing system Cs writes in data as the program via a flexibledisk drive FDD. When the coding device and the decoding device areconstructed in the computing system by the program on the flexible disk,the picture coding method and a picture decoding method as the programis read out from the flexible disk drive and then transferred to thecomputing system Cs.

The above explanation is made on an assumption that a storing medium isa flexible disk, but the same processing can also be performed using anoptical disk. In addition, the storing medium is not limited to aflexible disk and an optical disk, but any other medium such as an ICcard and a ROM cassette capable of recording a program can be used.

The Fourth Embodiment

The following is an explanation of the applications of the picturecoding method as well as the picture decoding method as shown in theabove-mentioned embodiments, and a system using them.

FIG. 14 is a block diagram showing an overall configuration of a contentsupply system ex100 for realizing content distribution service. The areafor providing communication service is divided into cells of desiredsize, and cell sites ex107˜ex110 which are fixed wireless stations areplaced in respective cells.

This content supply system ex100 is connected to devices such asInternet ex101, an Internet service provider ex102, a telephone networkex104, as well as a computer ex111, a PDA (Personal Digital Assistant)ex112, a camera ex113, a cell phone ex114 and a cell phone with a cameraex115 via the cell sites ex107˜ex110.

However, the content supply system ex100 is not limited to theconfiguration as shown in FIG. 14 and may be connected to a combinationof any of them. Also, each device may be connected directly to thetelephone network ex104, not through the cell sites ex107˜ex110.

The camera ex113 is a device capable of shooting video such as a digitalvideo camera. The cell phone ex114 may be a cell phone of any of thefollowing system: a PDC (Personal Digital Communications) system, a CDMA(Code Division Multiple Access) system, a W-CDMA (Wideband-Code DivisionMultiple Access) system or a GSM (Global System for MobileCommunications) system, a PHS (Personal Handyphone System) or the like.

A streaming server ex103 is connected to the camera ex113 via thetelephone network ex104 and also the cell site ex109, which realizes alive distribution or the like using the camera ex113 based on the codeddata transmitted from the user. Either the camera ex113 or the serverwhich transmits the data may code the data. Also, the picture data shotby a camera ex116 may be transmitted to the streaming server ex103 viathe computer ex111. In this case, either the camera ex116 or thecomputer ex111 may code the picture data. An LSI ex117 included in thecomputer ex111 or the camera ex116 actually performs coding processing.Software for coding and decoding pictures may be integrated into anytype of storage medium (such as a CD-ROM, a flexible disk and a harddisk) that is a recording medium which is readable by the computer ex111or the like. Furthermore, a cell phone with a camera ex115 may transmitthe picture data. This picture data is the data coded by the LSIincluded in the cell phone ex115.

The content supply system ex100 codes contents (such as a music livevideo) shot by a user using the camera ex113, the camera ex116 or thelike in the same way as shown in the above-mentioned embodiments andtransmits them to the streaming server ex103, while the streaming serverex103 makes stream distribution of the content data to the clients attheir requests. The clients include the computer ex111, the PDA ex112,the camera ex113, the cell phone ex114 and so on capable of decoding theabove-mentioned coded data. In the content supply system ex100, theclients can thus receive and reproduce the coded data, and can furtherreceive, decode and reproduce the data in real time so as to realizepersonal broadcasting.

When each device in this system performs coding or decoding, the picturecoding method or the picture decoding method shown in theabove-mentioned embodiments can be used.

A cell phone will be explained as an example of the device.

FIG. 15 is a diagram showing the cell phone ex115 using the picturecoding method and the picture decoding method explained in theabove-mentioned embodiments. The cell phone ex115 has an antenna ex201for communicating with the cell site ex110 via radio waves, a cameraunit ex203 such as a CCD camera capable of shooting moving and stillpictures, a display unit ex202 such as a liquid crystal display fordisplaying the data such as decoded pictures and the like shot by thecamera unit ex203 or received by the antenna ex201, a body unitincluding a set of operation keys ex204, a audio output unit ex208 suchas a speaker for outputting audio, a audio input unit ex205 such as amicrophone for inputting audio, a storage medium ex207 for storing codedor decoded data such as data of moving or still pictures shot by thecamera, data of received e-mails and that of moving or still pictures,and a slot unit ex206 for attaching the storage medium ex207 to the cellphone ex115. The storage medium ex207 stores in itself a flash memoryelement, a kind of EEPROM (Electrically Erasable and Programmable ReadOnly Memory) that is a nonvolatile memory electrically erasable from andrewritable to a plastic case such as an SD card.

Next, the cell phone ex115 will be explained with reference to FIG. 16.In the cell phone ex115, a main control unit ex311, designed in order tocontrol overall each unit of the main body which contains the displayunit ex202 as well as the operation keys ex204, is connected mutually toa power supply circuit unit ex310, an operation input control unitex304, a picture coding unit ex312, a camera interface unit ex303, anLCD (Liquid Crystal Display) control unit ex302, a picture decoding unitex309, a multiplexing/demultiplexing unit ex308, a read/write unitex307, a modem circuit unit ex306 and a audio processing unit ex305 viaa synchronous bus ex313.

When a call-end key or a power key is turned ON by a user's operation,the power supply circuit unit ex310 supplies respective units with powerfrom a battery pack so as to activate the camera attached digital cellphone ex115 as a ready state.

In the cell phone ex115, the audio processing unit ex305 converts theaudio signals received by the audio input unit ex205 in conversationmode into digital audio data under the control of the main control unitex311 including a CPU, ROM and RAM, the modem circuit unit ex306performs spread spectrum processing of the digital audio data, and thecommunication circuit unit ex301 performs digital-to-analog conversionand frequency conversion of the data, so as to transmit it via theantenna ex201. Also, in the cell phone ex115, the communication circuitunit ex301 amplifies the data received by the antenna ex201 inconversation mode and performs frequency conversion andanalog-to-digital conversion to the data, the modem circuit unit ex306performs inverse spread spectrum processing of the data, and the audioprocessing unit ex305 converts it into analog audio data, so as tooutput it via the audio output unit ex208.

Furthermore, when transmitting an e-mail in data communication mode, thetext data of the e-mail inputted by operating the operation keys ex204of the main body is sent out to the main control unit ex311 via theoperation input control unit ex304. In the main control unit ex311,after the modem circuit unit ex306 performs spread spectrum processingof the text data and the communication circuit unit ex301 performsdigital-to-analog conversion and frequency conversion for the text data,the data is transmitted to the cell site ex110 via the antenna ex201.

When picture data is transmitted in data communication mode, the picturedata shot by the camera unit ex203 is supplied to the picture codingunit ex312 via the camera interface unit ex303. When it is nottransmitted, it is also possible to display the picture data shot by thecamera unit ex203 directly on the display unit ex202 via the camerainterface unit ex303 and the LCD control unit ex302.

The picture coding unit ex312, which includes the picture codingapparatus as explained in the present invention, compresses and codesthe picture data supplied from the camera unit ex203 by the codingmethod used for the picture coding apparatus as shown in theabove-mentioned first embodiment so as to transform it into codedpicture data, and sends it out to the multiplexing/demultiplexing unitex308. At this time, the cell phone ex115 sends out the audio receivedby the audio input unit ex205 during the shooting with the camera unitex203 to the multiplexing/demultiplexing unit ex308 as digital audiodata via the audio processing unit ex305.

The multiplexing/demultiplexing unit ex308 multiplexes the coded picturedata supplied from the picture coding unit ex312 and the audio datasupplied from the audio processing unit ex305 using a predeterminedmethod, then the modem circuit unit ex306 performs spread spectrumprocessing of the multiplexed data obtained as a result of themultiplexing, and lastly the communication circuit unit ex301 performsdigital-to-analog conversion and frequency conversion of the data forthe transmission via the antenna ex201.

As for receiving data of a moving picture file which is linked to a Webpage or the like in data communication mode, the modem circuit unitex306 performs inverse spread spectrum processing of the data receivedfrom the cell site ex110 via the antenna ex201, and sends out themultiplexed data obtained as a result of the inverse spread spectrumprocessing.

In order to decode the multiplexed data received via the antenna ex201,the multiplexing/demultiplexing unit ex308 separates the multiplexeddata into a bit stream of picture data and that of audio data, andsupplies the coded picture data to the picture decoding unit ex309 andthe audio data to the audio processing unit ex305, respectively, via thesynchronous bus ex313.

Next, the picture decoding unit ex309, including the picture decodingapparatus as explained in the above-mentioned invention, decodes the bitstream of picture data using the decoding method corresponding to thecoding method as shown in the above-mentioned embodiments to generatereproduced moving picture data, and supplies this data to the displayunit ex202 via the LCD control unit ex302, and thus the picture dataincluded in the moving picture file linked to a Web page, for instance,is displayed. At the same time, the audio processing unit ex305 convertsthe audio data into analog audio data, and supplies this data to theaudio output unit ex208, and thus the audio data included in the movingpicture file linked to a Web page, for instance, is reproduced.

The present invention is not limited to the above-mentioned system assuch ground-based or satellite digital broadcasting has been in the newslately and at least either the picture coding apparatus or the picturedecoding apparatus described in the above-mentioned embodiments can beincorporated into a digital broadcasting system as shown in FIG. 17.More specifically, a bit stream of video information is transmitted froma broadcast station ex409 to or communicated with a broadcast satelliteex410 via radio waves. Upon receipt of it, the broadcast satellite ex410transmits radio waves for broadcasting. Then, a home-use antenna ex406with a satellite broadcast reception function receives the radio waves,and a television (receiver) ex401 or a set top box (STB) ex407 decodesthe bit stream for reproduction. The picture decoding apparatus as shownin the above-mentioned embodiment can be implemented in the reproducingapparatus ex403 for reading out and decoding the bit stream recorded ona storage medium ex402 that is a recording medium such as CD and DVD. Inthis case, the reproduced video signals are displayed on a monitorex404. It is also conceivable to implement the picture decodingapparatus in the set top box ex407 connected to a cable ex405 for acable television or the antenna ex406 for satellite and/or ground-basedbroadcasting so as to reproduce them on a monitor ex408 of thetelevision ex401. The picture decoding apparatus may be incorporatedinto the television, instead of in the set top box. Also, a car ex412having an antenna ex411 can receive signals from the satellite ex410 orthe cell site ex107 for reproducing moving pictures on a display devicesuch as a car navigation system ex413 set in the car ex412.

Furthermore, the picture coding apparatus as shown in theabove-mentioned embodiments can code picture signals and record them ona recording medium. As a specific example, a recorder ex420 such as aDVD recorder for recording picture signals on a DVD disk ex421, a diskrecorder for recording them on a hard disk, can be used. They can berecorded on an SD card ex422. If the recorder ex420 includes the picturedecoding apparatus as shown in the above-mentioned embodiments, thepicture signals recorded on the DVD disk ex421 or the SD card ex422 canbe reproduced for display on the monitor ex408.

As for the structure of the car navigation system ex413, the structurewithout the camera unit ex203, the camera interface unit ex303 and thepicture coding unit ex312, which are components shown in FIG. 16, isconceivable. The same applies for the computer ex111, the television(receiver) ex401 and others.

In addition, three types of implementations can be conceived for aterminal such as the above-mentioned cell phone ex114; asending/receiving terminal implemented with both a coder and a decoder,a sending terminal implemented with a coder only, and a receivingterminal implemented with a decoder only.

As described above, it is possible to use the picture coding method orthe picture decoding method described in the above-mentioned embodimentsfor any of the above-mentioned devices and systems, and by using thismethod, the effects described in the above-mentioned embodiments can beobtained.

The picture coding apparatus according to the present invention isuseful as the picture coding apparatus that is included in a personalcomputer and a PDA that are equipped with a communication function, adigital broadcasting station, a cell phone and the like.

The picture decoding apparatus according to the present invention isuseful as the picture decoding apparatus that is included in a personalcomputer and a PDA with the communication function, an STB that receivesdigital broadcast, cell phone and the like.

1. A picture decoding method for decoding a current block of a currentmacroblock included in a current B picture in direct mode, withreference to a motion vector of an adjacent macroblock that is locatedadjacent to the current macroblock, the picture decoding methodcomprising: obtaining a reference motion vector from a block for whichmotion compensation has been performed, the block being included in aco-located block, the co-located block being included in a co-locatedmacroblock, the co-located macroblock being included in a picturesubsequent in display order to the current B picture, wherein the sizeof the block is smaller than the size of the current block and the sizeof the co-located block is the same as the current block and wherein theblock is located in a corner of the co-located macroblock; specifyingplural adjacent macroblocks which are located adjacent to the currentmacroblock; determining a motion vector of the current block to bedecoded for performing motion compensation on the current block usingthe obtained reference motion vector; generating a predictive image ofthe current block by using the determined motion vector of the currentblock; decoding a coded difference image between the current block andthe generated predictive image of the current block to obtain a decodeddifference image of the current block; and recovering a reconstructedimage of the current block by adding the generated predictive image ofthe current block and the decoded difference image of the current block,wherein, in the case where a size of the obtained reference motionvector is a predetermined value or less, the motion vector of thecurrent block is determined to be “0”, and in the case where the size ofthe obtained reference motion vector exceeds the predetermined value,the motion vector of the current block is determined to be a median ofplural motion vectors of the plural adjacent macroblocks, wherein, themotion vector of the adjacent macroblock is determined to be a motionvector of a motion compensated block included in the adjacent macroblockin the case where a size of the motion compensated block is the same asa size of the adjacent macroblock, and the motion vector of the adjacentmacroblock is determined to be a motion vector of the 4×4 block includedin the adjacent macroblock in the case where a size of the motioncompensated block is smaller than a size of the adjacent macroblock,wherein (1) the 4×4 block is a block located on the upper-right cornerof the adjacent macroblock in the case that the adjacent macroblock islocated to the left of the current macroblock, and (2) the 4×4 block isa block located on the lower-left corner of the adjacent macroblock inthe case that the adjacent macroblock is located above the currentmacroblock, and (3) the 4×4 block is a block located on the lower-leftcorner of the adjacent macroblock in the case that the adjacentmacroblock is located above-right of the current macroblock.
 2. Thepicture decoding method according to claim 1, wherein a size of thecurrent macroblock, the adjacent macroblock and the co-locatedmacroblock is 16 pixels×16 pixels, a size of the current block is 8pixels×8 pixels, and a size of each of the plurality of blocks which areincluded in the co-located macroblock and for which motion compensationhas been performed is 4 pixels×4 pixels.
 3. The picture decoding methodaccording to claim 1, wherein the co-located macroblock is included in aB picture.
 4. A picture decoding apparatus which decodes a current blockof a current macroblock included in a current B picture in direct mode,with reference to a motion vector of an adjacent macroblock that islocated adjacent to the current macroblock, the picture decodingapparatus comprising: a motion vector obtaining unit operable to obtaina reference motion vector from a block for which motion compensation hasbeen performed, the block being included in a co-located block, theco-located block being included in a co-located macroblock, theco-located macroblock being included in a picture subsequent in displayorder to the current B picture, wherein the size of the block is smallerthan the size of the current block and the size of the co-located blockis the same as the current block and wherein the block is located in acorner of the co-located macroblock; a specifying unit operable tospecify plural adjacent macroblocks which are located adjacent to thecurrent macroblock; a motion vector determining unit operable todetermine a motion vector of the current block to be decoded forperforming motion compensation on the current block using the obtainedreference motion vector; a predictive image generating unit operable togenerate a predictive image of the current block by using the determinedmotion vector of the current block; a difference image decoding unitoperable to decode a coded difference image between the current blockand the generated predictive image of the current block to obtain adecoded difference image of the current block; and a reconstructed imagerecovering unit operable to recover a reconstructed image of the currentblock by adding the generated predictive image of the current block andthe decoded difference image of the current block, wherein, in the casewhere a size of the obtained reference motion vector is a predeterminedvalue or less, the motion vector for the current block is determined tobe “0”, and in the case where the size of the obtained motion vectorexceeds the predetermined value, the motion vector of the current blockis determined to be a median of plural motion vectors of the pluraladjacent macroblocks, wherein, the motion vector of the adjacentmacroblock is determined to be a motion vector of a motion compensatedblock included in the adjacent macroblock in the case where a size ofthe motion compensated block is the same as a size of the adjacentmacroblock, and the motion vector of the adjacent macroblock isdetermined to be a motion vector of the 4×4 block included in theadjacent macroblock in the case where a size of the motion compensatedblock is smaller than a size of the adjacent macroblock, wherein (1) the4×4 block is a block located on the upper-right corner of the adjacentmacroblock in the case that the adjacent macroblock is located to theleft of the current macroblock, and (2) the 4×4 block is a block locatedto the lower-left corner of the adjacent macroblock in the case that theadjacent macroblock is located above the current macroblock, and (3) the4×4 block is a block located on the lower-left corner of the adjacentmacroblock in the case that the adjacent macroblock is locatedabove-right of the current macroblock.